﻿<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <p class="navbar-text">Registered users: <span class="text-bold">{{registeredUsers}}</span></p>
    <p class="navbar-text">Votes cast: <span class="text-bold">{{votesCast}}</span></p>
</nav>
<div class="container">
    <div class="text-center movieListHeader">Hi <span style="color: #24C0EB;">{{loggedPerson.Description}}</span>!</div>
    <br/>
    <br/>
    <br/>
    <div ng-show="loading" class="text-center">Loading movie list...</div>
    <div ng-show="loading" class="text-center"><i class="icon-refresh icon-spin"></i></div>
    
    <div class="panel panel-default" ng-repeat="movie in movieList">
        <div class="panel-heading">
            <h1 class="panel-title">{{movie.Title}}</h1>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-md-2">
                    <img src="{{movie.CoverUrl}}"/>
                </div>
                <div class="col-md-10">
                    <h3 class="text-italic">{{movie.Tagline}}</h3>
                    <br/>
                    <div class="text-bold">Description</div>
                    <div>{{movie.Description}}</div>
                    <br/>
                    <div class="text-bold">Release date</div>
                    <div>{{movie.ReleaseDate}}</div>
                    <br/>
                    <div class="text-bold">Rating</div>
                    <rating value="movie.Evaluation" max="6" on-leave="RateMovie(movie, value)"></rating>
                    <button type="button" ng-class="{'btn-primary': movie.Evaluation == null, 'btn-info': movie.Evaluation != null}" class="btn btn-xs" ng-click="RateMovie(movie, null)"><i class="icon-minus-sign"></i> Not seen</button>
                </div>
            </div>
        </div>
    </div>
    
    <div class="text-center">
        <button type="submit" ng-show="!loading" class="btn btn-primary btn-lg" ng-click="null">Save</button>
    </div>
</div>